package com.asm.repository;

import com.asm.entity.sys.CommunityTag;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface CommunityTagRepository extends JpaRepository<CommunityTag, Long> {
    Page<CommunityTag> findByTagType(String tagType, Pageable page);

    Page<CommunityTag> findByCommunityId(Long communityId, Pageable page);

    @Query("select c from CommunityTag c where c.isDel=false ")
    Page<CommunityTag> findAll(PageRequest of);
}
